-- GENERATED SPELL FOR [Earthen Guardian] --


function spell0_7076(pUnit, Event) --@Earthen Guards Destroyed,n/a--
pUnit:FullCastSpellOnTarget(10666,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7076', 670, 1)
end

function spell1_7076(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_7076', 629, 1)
end

function spell2_7076(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_7076', 2000, 1)
end

function Sorts_7076(pUnit, Event)
local choix_sorts_7076 = math.random(0, 2)
if choix_sorts_7076 == 0 then
pUnit:RegisterEvent('spell0_7076', 1, 1)
end
if choix_sorts_7076 == 1 then
pUnit:RegisterEvent('spell1_7076', 1, 1)
end
if choix_sorts_7076 == 2 then
pUnit:RegisterEvent('spell2_7076', 1, 1)
end
end

function mob7076_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7076', math.random(1500, 3000), 1)
end

function mob7076_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7076_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7076_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7076, 1, 'mob7076_Action')
RegisterUnitEvent(7076, 2, 'mob7076_Leave')
RegisterUnitEvent(7076, 3, 'mob7076_Kill')
RegisterUnitEvent(7076, 4, 'mob7076_Die')
